#include <MAUtil/Moblet.h>
#include <MAUI/Screen.h>
#include <MAUI/Label.h>
#include <MAUI/Layout.h>
#include <MAUI/EditBox.h>
#include <MAUI/Font.h>
#include "Util.h"
#include <MAUI/ListBox.h>
#include <MAUI/Image.h>
#include <madmath.h>
#include <mastdlib.h>
#include <conprint.h>

#include "User.h"


#ifndef USERINFO_H_
#define USERINFO_H_

class UserScreen : public MAUI::Screen, public MAUtil::TextBoxListener
{
public:
	UserScreen(Screen *previous, User *myUser);;
	virtual ~UserScreen();
	void createUI();
	void pointerPressEvent(MAPoint2d);
	void pointerReleaseEvent(MAPoint2d);
	void keyPressEvent(int, int);
	void selectPreviousWidget();
	void selectNextWidget();
	void runWidgetAction();
	void clearButtonAction();
	void submitButtonAction();
	void editBoxAction();
	void textBoxClosed(int, int);


private:
	/** The main layout that holds the other widgets. */
	MAUI::Layout * mMainLayoutWidget;

	/** A text label that displays instructions. */
	MAUI::Label * mInstructions;

	/** Text editor box for user input. */
	MAUI::EditBox * mPasswordBox;

	/** The Clear button. */
	MAUI::Label * mClearButton;

	/** The Submit button. */
	MAUI::Label * mSubmitButton;

	/** Buffer that holds the result from the maTextBox syscall. */
	wchar_t mTextBoxBuffer[256];

	Screen *previous;

	User* myUser;
};
#endif /* USERINFO_H_ */
